/**
 * 
 */
package javapop.framework.generic.tool;

import java.util.List;

import javapop.framework.ParseInput;
import javapop.framework.generic.GChoice;
import javapop.framework.generic.GDefRegle;
import javapop.framework.generic.GExprBracket;
import javapop.framework.generic.GExprOperand;
import javapop.framework.generic.GExprOperator;
import javapop.framework.generic.GExprParser;
import javapop.framework.generic.GIgnore;
import javapop.framework.generic.GKeyword;
import javapop.framework.generic.GKeywords;
import javapop.framework.generic.GListOf;
import javapop.framework.generic.GLiteral;
import javapop.framework.generic.GMaybe;
import javapop.framework.generic.GMaybeOrDefault;
import javapop.framework.generic.GMeta;
import javapop.framework.generic.GRefParser;
import javapop.framework.generic.GRegexp;
import javapop.framework.generic.GRegexpWithoutKeywords;
import javapop.framework.generic.GRegle;
import javapop.framework.generic.GTransform;
import javapop.framework.generic.GTuple;
import javapop.framework.generic.GrammarTree;

/**
 * @author Hakim
 *
 */
public interface GrammarVisitor<T,R,E extends Exception> {
	void init(List<GrammarTree> grammar) throws E;
	R treatment(ParseInput input) throws E;
	
	T visit(GChoice o) throws E;
	T visit(GDefRegle r) throws E;
	T visit(GExprBracket b) throws E;
	T visit(GExprOperand o) throws E;
	T visit(GExprOperator o) throws E;
	T visit(GExprParser o) throws E;
	T visit(GIgnore o) throws E;
	T visit(GKeyword o) throws E;
	T visit(GListOf o) throws E;
	T visit(GLiteral o) throws E;
	T visit(GMaybeOrDefault o) throws E;
	T visit(GMeta o) throws E;
	T visit(GRefParser o) throws E;
	T visit(GRegexp o) throws E;
	T visit(GRegexpWithoutKeywords o) throws E;
	T visit(GRegle o) throws E;
	T visit(GTransform o) throws E;
	T visit(GTuple o) throws E;
	T visit(GKeywords o) throws E;
	T visit(GMaybe gMaybe) throws E;
}
